﻿// <copyright file="Initialisation.cs" company="Auros Ltd.">
//     Copyright (c) Auros Ltd. All rights reserved.
// </copyright>

namespace Auros.Categorisation.Umbraco
{
    using System.ServiceModel.Activation;
    using System.Web.Routing;
    using umbraco.BusinessLogic;

    /// <summary>
    /// Class which initialises any dependencies for the functionality built into this assembly.
    /// </summary>
    public class Initialisation : ApplicationBase
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Initialisation"/> class.
        /// </summary>
        public Initialisation()
        {
            RouteTable.Routes.Add("CategorisationService", new DynamicServiceRoute("umbraco/webservices/categorisation", null, new WebServiceHostFactory(), typeof(CategoryDataService)));

            Log.Add(LogTypes.System, -1, "Service route added for " + typeof(CategoryDataService).ToString() + ". (umbraco/webservices/categorisation)");
        }
    }
}